package animation;

public class AnimationFrame {

	/**
	 * The width and height of animation frames. 
	 * My table is 8 x 6, but this can be adjusted for varying tables / displays.
	 */
	protected static int width = 8, height = 6;
	
	protected int delay_ms;
	
	/**
	 * notice the cells are accessed publicly
	 */
	public boolean[][] cells;
	
	public AnimationFrame()
	{
		this(20);
	}
	
	public AnimationFrame(int delay)
	{
		this.cells = new boolean[width][height];
		this.delay_ms = delay;
	}
	
	public int getWidth()
	{
		return width;
	}
	
	public int getHeight()
	{
		return height;
	}
	
	public void clear()
	{
		for(int j = 0; j < this.width; j ++)
		{
			for(int i = 0; i < this.height; j++)
			{
				this.cells[i][j] = false;
			}
		}
	}
	
	public static void setWidth(int width) {
		AnimationFrame.width = width;
	}

	public static void setHeight(int height) {
		AnimationFrame.height = height;
	}

	public int getDelay()
	{
		return delay_ms;
	}
	
}

